package Array;

import java.util.*;
import java.io.*;
public class Game{

  /*
  题5----------读心术游戏---
请任意想一个正两位数，减去个位和十位的数，在下表找到差值。
请记住该差值前面的字母。
[M] 0	[R] 22	[O] 66	[K] 87	[O] 64	[O] 58	[X] 32	[I] 76	[T] 6	[M] 9	
[Z] 52	[P] 11	[D] 21	[T] 39	[T] 30	[T] 59	[D] 86	[C] 46	[M] 18	[K] 35	
[W] 37	[W] 2	[D] 14	[B] 67	[N] 70	[K] 15	[B] 3	[M] 27	[W] 55	[T] 11	
[K] 12	[P] 38	[X] 96	[Y] 94	[V] 33	[D] 37	[M] 36	[S] 24	[J] 11	[I] 87	
[V] 74	[B] 16	[D] 97	[S] 44	[O] 16	[M] 45	[C] 64	[T] 3	[S] 73	[C] 73	
[Z] 60	[L] 53	[R] 69	[G] 76	[M] 54	[Q] 67	[A] 55	[R] 61	[D] 44	[Z] 75	
[D] 65	[Z] 68	[Y] 33	[M] 63	[X] 28	[U] 8	[M] 73	[S] 70	[Q] 85	[R] 48	
[X] 71	[G] 77	[M] 72	[X] 29	[Z] 41	[L] 86	[F] 92	[R] 64	[K] 1	[D] 52	
[B] 46	[M] 81	[R] 28	[L] 20	[J] 44	[R] 86	[X] 19	[R] 42	[N] 10	[X] 100	
[M] 90	[V] 8	[C] 37	[R] 7	[Z] 30	[B] 23	[J] 20	[M] 10	[C] 30	[M] 99	
请按任意键后敲回车继续下一步！
 
该字母是：M
o(∩_∩)o.....谢谢试玩！
  */
  
  private char five(){
    System.out.println("----------读心术游戏---请任意想一个正两位数，减去个位和"+
    "十位的数，在下表找到差值。请记住该差值前面的字母。");
    Random r = new Random();
    int theNum = r.nextInt(25)+65;
    char theC = (char)theNum;
    int[] intArray = {9, 18, 27, 36, 45, 54, 63, 72, 81, 90};
    for(int i=1;i<=10;i++){
      for(int j=1;j<=10;j++){
        if(i+j!=11){
          int randomNum = r.nextInt(25)+65;
          if(randomNum%9==0){
            randomNum += 1;
          }
          char randomC = (char)randomNum;
          System.out.print("["+randomC+"]"+" "+r.nextInt(100)+" ");
        }else{
           System.out.print("["+theC+"]"+" "+intArray[i-1]+" ");
        }
      }
      System.out.println();
    }//for循环结束
    System.out.println("请按任意键后敲回车继续下一步！");
    return theC;
  }
  
  
  
  
  public static void main(String[] a){
    Date date1 = new Date();
    Game test = new Game();
    char c = test.five();
    Date date2 = new Date();
    System.out.println(date2.getTime()-date1.getTime());
    BufferedReader buff = new BufferedReader(new InputStreamReader(System.in));
    try{
      String str = buff.readLine();
    }catch(IOException e){
      e.printStackTrace();
    }
    
    System.out.println("该字母是："+c+"\n"+"o(∩_∩)o.....谢谢试玩！");
  }
} 
